<template>
  <div class="room_b_frame">
    <el-form>
        <el-form-item label="房间名称">
            <el-input v-model="form.roomName"></el-input>
        </el-form-item>
        <el-form-item>
    <el-button type="primary" @click="onSubmit">立即创建</el-button>
  </el-form-item>
    </el-form>
  </div>
</template>

<script>

import { mapState } from 'vuex'; 
export default {
name:'RoomBuild',
data(){
    return {
        form:{
            roomName:''
        }
    }
},
computed:{
...mapState('userAbout',['user','token']),
},
methods:{
    onSubmit(){
        this.$basicAxios(this.$ms.create_room(this.form.roomName,this.token),()=>{
            this.notify('info','[ success ] 房间创建成功')
        })
    }
}
}
</script>

<style>
.room_b_frame{
    width:100%;
    height:100%;
    padding: 5% 15% 0% 15%;
}
</style>